from deepdiff import DeepDiff

# 对比json

json1 = {
    'code': 0,
    'message': '成功',
    'data': {
        "total": 28,
        'id': 123
    }
}
json2 = {
    'code': 0,
    'message': '成功',
    'data': {
        "total": 29
    }
}
print(DeepDiff(json1, json2))
